#include<sys/un.h>
#include<sys/socket.h>
#include<string.h>
#include<assert.h>
#include<stdio.h>
#include<unistd.h>
#include<errno.h>
#include <stdlib.h>
#include<ctype.h>
#include <tlpi_hdr.h>
#define SV_SOCK_PATH "/tmp/us_xfr"
#define BACKLOG 5
typedef struct sockaddr_un Sockaddr_un;

void ini_path(int domain,Sockaddr_un* addr , char * path)
{
    if (strlen(path) > sizeof(addr->sun_path) - 1)
        fatal("Server socket path too long: %s", path);
    memset(addr,0,sizeof (struct sockaddr_un));
    addr->sun_family = domain;
    strncpy(addr->sun_path,path,sizeof(addr->sun_path) - 1);
}